package dormouse;

import org.springframework.context.ApplicationContext;

import dormouse.vfs.ui.renderers.IFileIconFactory;

/**
 * This class provides a global context for the Dormouse application.
 */
public class DormouseContext {
	
	/** The application context. */
	private static ApplicationContext context = null;
	
	/**
	 * This method sets the application context.
	 * @param cont the new context.
	 */
	public static void setContext(ApplicationContext cont){
		context = cont;
	}

	public static IFileIconFactory getIconFactory(){
		return (IFileIconFactory) context.getBean("iconFactory");
	}

}
